home *** CD-ROM | disk | FTP | other *** search
- Path: news.crystalball.com!news
- From: Larry Weiss <lfw@oc.com>
- Newsgroups: comp.lang.c
- Subject: Re: #include --> Question
- Date: Thu, 29 Feb 1996 14:15:12 -0600
- Organization: crystalball.com
- Message-ID: <31360950.4883@oc.com>
- References: <4gvp2c$sdr$1@mhafc.production.compuserve.com> <4h1d2l$4n3@pyrrhus-f.hrz.tu-chemnitz.de> <4h2si8$1bf@solutions.solon.com> <31359A05.4014@iadfw.net> <4h4spq$c68@solutions.solon.com>
- NNTP-Posting-Host: external.oc.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
- CC: lfw@oc.com
-
- Peter Seebach wrote:
- >
- > >Peter Seebach wrote:
- >
- > >> The character '\' introduces undefined behavior in a header file name.
- >
- > >Peter, are you sure about this? Can you cite a clause of the Standard?
- > >I'm looking at Clause 6.8.2 and 6.1.7. The only characters that cannot be
- > >used in a #include "name" header name according to those sections are
- > >newline and doublequote.
-
- > (Because all of the relevant quoting characters are being discussed, I will
- > use q for quotes.)
- > Ahh, but you must also read the paragraph below that (also 6.1.7), which
- > states that if the characters q'q, q\q, or q/*q occur between the q"q
- > delimiters, the behavior is undefined. (Between q<q and q>q, q"q also
- > introduces undefined behavior.)
- > There's a footnote (25) attached to this - "Thus, sequences of characters that
- > resemble esqape sequences cause undefined behavior."
- >
- > >Of course, all interpretation of the characters used to signify a
- > > #include "name" are implementation defined.
- >
- > Yes.
- >
-
-
- OK. I see it now. So, it would be permissible (Clause 3.16) for an
- implementation to document exactly what the consequence of using '\'
- in a #include "name" scenario would be.....and because it's up to the
- implementation to document what even the not undefined behavior
- causing constructions using #include "name" really mean, then there's
- really not much difference to those implementations that do allow
- '\' to have meaning in #include "name" directives?
-
- There are of course, portability concerns, but it seems that not much is
- guaranteed anyway regarding portability of #include "name" directives
- by the Standard.
-